package com.wymobilearchitecture.heade_frist.adapter.duck;

import com.wymobilearchitecture.heade_frist.adapter.Duck;
import com.wymobilearchitecture.heade_frist.adapter.behavior.FlyWithWings;
import com.wymobilearchitecture.heade_frist.adapter.behavior.QuackWithGuaGua;

/**
 *野鸭子
 */
public class MallardDuck extends Duck {

    public MallardDuck(){
        flyBehavior = new FlyWithWings();
        quackBehavior = new QuackWithGuaGua();
    }

    @Override
    protected void display() {
        System.out.println("display: 绿头");
    }



    //针对实现编程
    @Override
    protected void quack() {

        System.out.println("呱呱叫");
    }
}
